<?php session_start();
	  require_once ("../adm_usuarios.php");
	   if (isset($_SESSION['USU_TIPO']))
		 {
          if($_SESSION["USU_TIPO"] == "I")
         {
             val_modulo(12);
         }
         elseif($_SESSION["USU_TIPO"] == "S")
         {
            val_modulo(4);
         }
		   }
		 else
		 {
		 val_modulo(4);
		 }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- Código del Icono -->			
<link href="../images/logo.ico" type="image/x-icon" rel="shortcut icon" />			
<!-- InstanceBeginEditable name="doctitle" -->

<title>Ver Curso</title>
<link href="../styles/tesis.css" rel="stylesheet" type="text/css" media="screen" />


<!-- start jquery ui -->
<script type="text/javascript" src="../scripts/jquery162.js"></script>
<script type="text/javascript" src="../scripts/error_list.js"></script>
<link href="../styles/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="../styles/jquery-ui.min.js"></script>
<script src="../scripts/gen_validate.js" type="text/javascript"></script>
<!-- end jquery ui -->
<?php
		/*Conexion a la base de datos */
	require_once("../conexion/conexion.php");
?>

<script type="text/javascript">

$(document).ready(function() {
	menuPrincipal ('3');
    showLog(<?php echo $logueo; ?>);
    <?php if($logueo == TRUE){echo habilitar_menu();} ?>

    $("#tabs").tabs();
    $("#obtener").click();
	
  }); // fin document.ready

function showLogin()
{
$(".loginbox").slideToggle("slow");
}

 function obtenerinfo(){
     $.ajax({
				url: "../lib/ObtCur.php",
				type: "GET",
				data: "id_curso="+$("#obtener").val(),
				success: function(datos){
                                                     var array = datos.split('||');
                                                     $("#selEstado").val(array[1]);
                                                     $("#selInstitucion").val(array[2]);
                                                     $("#txtLugar").val(array[3]);
                                                     $("#FecInicio").val(array[4]);
                                                     $("#FecFin").val(array[5]);
                                                     $("#numCupo").val(array[6]);
                                                     $("#txtHorCurso").val(array[7]);
                                                     $("#numHoras").val(array[8]);
                                                     $("#txtPerfil").val(array[9]);
                                                     $("#txtTipofor").val(array[10]);
                                                     $("#txtExprevia").val(array[11]);
                                                     $("#txtValint").val(array[12]);
                                                     }
                                                
                                           });
     
     
 }


</script>
<!-- InstanceEndEditable -->
<link href="../styles/tesis.css" rel="stylesheet" type="text/css" media="screen" />

<!-- Script Accordeon Menu -->
<script type="text/javascript" src="../scripts/ddaccordion.js"></script>
<script type="text/javascript">

ddaccordion.init({ //top level headers initialization
	headerclass: "expandable", //Shared CSS class name of headers group that are expandable
	contentclass: "categoryitems", //Shared CSS class name of contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})

ddaccordion.init({ //2nd level headers initialization
	headerclass: "subexpandable", //Shared CSS class name of sub headers group that are expandable
	contentclass: "subcategoryitems", //Shared CSS class name of sub contents group
	revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
	mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
	collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
	defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
	onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
	animatedefault: false, //Should contents open by default be animated into view?
	persiststate: true, //persist state of opened contents within browser session?
	toggleclass: ["opensubheader", "closedsubheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
	togglehtml: ["none", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
	animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
	oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
		//do nothing
	},
	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
		//do nothing
	}
})


</script>

<!-- Script Accordeon Menu -->
<style type="text/css">
<!--
.Estilo1 {
	font-size: 12px;
	font-style: italic;
	font-weight: bold;
}
.Estilo5 {font-style: italic; font-size: 12px;}
.Estilo6 {color: #FF0000}
.Estilo7 {font-size: 14px}
.Estilo8 {font-size: 16px}
.Estilo9 {
	font-weight: bold;
	font-size: 14px;
} 
.Estilo12 {font-size: 11px}
-->
</style>

<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>

<body>

<div class="container">
   <div class="header"><!-- #BeginLibraryItem "/Library/loginbox.lbi" -->
    <div class="loginButton login"><a onclick="showLogin()" href="javascript:;">Login</a></div>
    <div class="logoutButton logout" style="display:none"><a onclick="javascript:logout('../lib/logoff.php')" href="javascript:;">Bienvenido <?php if(isset($_SESSION['USU_NAME'])){ echo $_SESSION['USU_NAME'];} ?> <br /> Logout</a></div> 
<div class="loginbox">
    <form id="frm_login" name="frm_login" method="post" action="">
      <p>
        <label for="log_username">Usuario: </label>
        <input name="log_username" type="text" class="input-width" id="log_username" />
      </p>
      <p>
        <label for="log_password">Password: </label>
        <input name="log_password" type="password" class="input-width" id="log_password" /><span class="submit"><a href="javascript:validarIngreso('../lib/validarUsuario.php');">&nbsp;</a> </span>
      </p>
    </form>
  </div><!-- end .loginbox--><!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/logo.lbi" --><a href="#"><img src="../images/logo2.jpg" alt="Insert Logo Here" name="Insert_logo" width="180" height="90" id="Insert_logo" style="background: #f7d10e; display:block;" /></a><!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/navigation.lbi" --><div class="navigation">
      <ul class="nav">
        <li><a id="lnkEmp" class="lnkPrin" href="#">Empleo</a></li>
        <li><a id="lnkFor" class="lnkPrin" href="#">Formacion</a></li>
        <li><a id="lnkOri" class="lnkPrin" href="#">Orientacion</a></li>
        <li><a id="lnkRec" class="lnkPrin" href="#">Recepcion</a></li>
      </ul>
    </div><!-- #EndLibraryItem --><!-- end .navigation-->
  
  
  
  <!-- end .header --></div>
  <div class="sidebar1"><!-- #BeginLibraryItem "/Library/sidebar navigation.lbi" -->
      <div class="arrowlistmenu">
          <div id="menCita" class="menuShow" style="display:none">
           <h3 class="menuheader expandable">Citas</h3>
            <ul class="categoryitems captura">
              <li><a href="../cita/cit_registrar.php">Registro de Persona</a></li>
              <li><a href="../cita/cit_registrarc.php">Concertación de Cita</a></li>
              <li><a href="../cita/cit_buscar.php">Buscar Cita </a></li>
              <li><a href="../cita/cit_programadas.php" >Citas Programadas</a></li>
              <li><a href="../cita/cit_desbloq.php">Habilitar Usuario</a></li>
            </ul>
          </div>
          <div id="menRece" class="menuShow" style="display:none">
	  <h3 class="menuheader expandable">Recepcion</h3>
            <ul class="categoryitems captura">
              <li><a href="../rece/exp_crear.php" >Crear Expediente</a></li>
			  <li><a href="../regi/regi_interesados.php">Registro Interesados</a></li>
              <li><a href="../rece/exp_buscar.php">Buscar Expediente</a></li>
            </ul>
          </div>
          <div id="menOrie" class="menuShow" style="display:none">
            <h3 class="menuheader expandable">Orientacion</h3>
            <ul class="categoryitems captura">
              <li><a href="../orie/ori_busqueda_exp.php">Busqueda Orientacion</a></li>
              <li><a href="../orie/ori_busqueda_ori.php">Consultas de Orientacion</a></li>
            </ul>
          </div>
          <div id="menForm" class="menuShow" style="display:none">
            <h3 class="menuheader expandable">Formacion</h3>
            <ul class="categoryitems captura">
              <li><a href="for_regformativa.php">Ingreso de Institucion</a></li>
              <li><a href="for_regcurso.php?For=">Ingreso de Curso</a></li>
			  <li><a href="for_listar_personas.php">Candidatos a Curso</a></li>
              <li><a href="for_busformativa.php" >Busqueda de Institucion</a></li>
              <li><a href="for_buscurso.php" >Busqueda de Curso</a></li>
            </ul>
          </div>
	  <div id="menEmpl" class="menuShow" style="display:none">			
	    <h3 class="menuheader expandable">Empleo</h3>
            <ul class="categoryitems captura">
             <li><a href="../empl/emp_registrar.php">Ingreso de Empresa</a></li>
             <li><a href="../empl/emp_registrar_oferta.php?Empresa=">Registrar Oferta</a></li>
             <li><a href="../empl/emp_buscar.php">Busqueda de Empresa</a></li>
             <li><a href="../empl/emp_buscar_oferta.php">Busqueda de Ofertas</a></li>
             <li><a href="../empl/emp_listar_candidatos.php">Busqueda de Candidatos</a></li>
            </ul>
          </div>
          <div id="menSegu" class="menuShow" style="display:none">
            <h3 class="menuheader expandable">Seguimiento</h3>
            <ul class="categoryitems captura">
              <li><a href="../acci/acc_regaccion.php">Registro de Seguimiento</a></li>
              <li><a href="../acci/acc_busaccion.php">Busqueda de Seguimiento</a></li>
            </ul>
          </div>
          <div id="menRepo" class="menuShow" style="display:none">
            <h3 class="menuheader expandable">Reportes</h3>
            <ul class="categoryitems captura">
              <li><a href="../repo/rep_buscar_curriculo.php">Generacion de Curriculum</a></li>
              <li><a href="../repo/rep_orientacion.php">Reportes Orientacion</a></li>
              <li><a href="../repo/rep_formacion.php">Reportes Formacion</a></li>
              <li><a href="../repo/repo_empleo.php" >Reportes Empleo</a></li>
              <li><a href="../repo/rep_acciones.php" >Reportes Acciones</a></li>
			  <li><a href="../repo/rep_interesados.php">Reportes Interesados</a></li>
			</ul>
          </div>
		   
           <div id="menVist" class="menuShow" style="display:none">
            <h3 class="menuheader expandable">Ver Expediente</h3>
            <ul class="categoryitems captura">
                <li><a href="../vist/vis_busqueda.php">Vista de Expediente</a></li>
            </ul> 
          </div>
          <div id="menAdmi" class="menuShow" style="display:none">
            <h3 class="menuheader expandable">Administracion</h3>
            <ul class="categoryitems">
              <li id="menSusu" style="display:none"><a href="#" class="subexpandable">Usuario</a>
                <ul class="subcategoryitems">
                    <li><a href="../admo/usu_registrar.php" >Registro de Usuario</a></li>
                    <li><a href="../admo/usu_buscar.php">Busqueda de Usuario</a></li>
                    <li><a href="../admo/usu_habilitar.php">Administracion de seguridad</a></li>
                    <li><a href="../admo/adm_sesion.php">Tiempo de sesion</a></li>
         	</ul>
              </li> 
              <li id="menCata" style="display:none"><a href="#" class="subexpandable">Catalogos</a>
                <ul class="subcategoryitems">
                  <li><a href="../admo/cat_registrar.php">Registro de Catalogo</a></li>
                  <li><a href="../admo/cat_buscar.php">Busqueda de Catalogo</a></li> 
                </ul>
              </li>
            </ul>
          </div>  
          <div id="menInst" class="menuShow" style="display:none">
              <h3 class="menuheader expandable">Instituci&oacute;n</h3>
            <ul class="categoryitems captura">
              <li><a href="for_regcurso.php">Ingreso de cursos</a></li>
              <li><a href="for_cursos_por_institucion_capacitadora.php">Ver cursos</a></li>
            </ul>
          </div>
          <div id="menEmpr" class="menuShow" style="display:none">
            <h3 class="menuheader expandable">Empresa</h3>
            <ul class="categoryitems captura">
              <li><a href="../empl/emp_registrar_oferta.php">Ingreso de oferta</a></li>
              <li><a href="../empl/emp_ofertas_x_empresa_institucion.php">Ver ofertas</a></li>
            </ul>
          </div>
		  <div id="menCamP" class="menuShow" style="display:none">
            <h3 class="menuheader expandable">Mi cuenta</h3>
            <ul class="categoryitems captura">
              <li><a href="../admo/usu_modpass.php">Cambio de contraseña</a></li>
            </ul>
          </div>
          </div><!-- #EndLibraryItem --><p></p> 
         <a href="../Ayuda/ayuda_sil/ayuda_sapsil.chm"><h5 align="center">Ayuda
        <img src="../images/ayuda.gif" width="107" height="98" /></h5></a>   
    <!-- end .sidebar1 --></div>
  <div class="content"><!-- InstanceBeginEditable name="contenido" -->
    <form action="" method="post" name="form1" class="frm" id="form1">
      <h3><font color='#0000A0'> Informaci&oacute;n del curso</font></h3>
      <p>
        <label for="txtNombrec">Nombre curso</label>
                <?php
                $CodigoCur = $_GET['Cur'];
                 $sql = "SELECT CUR_NOMBRE FROM CURSO WHERE CUR_CODIGO='$CodigoCur'";
                                $result = mysql_query($sql);
                                  while ($row=mysql_fetch_array($result))
                                               {
                                                       echo "<input type='text' name='txtNombrec' id='txtNombrec' readonly='readonly' value='".$row["CUR_NOMBRE"]."' class='bloquear doble-column' />";
                                                       echo " <input name='obtener' type='hidden'  id='obtener'  onClick='obtenerinfo()' value='$CodigoCur' /> ";    
                                                       
                                               }
          ?>
		  </p>
		  <p></p>
		<p>
		<label for="selEstado">Estado</label>
        <select name="selEstado" id="selEstado" disabled="disabled">
		<option value="A">Activo</option>
        <option value="I">Inactivo</option>
        </select>
	</p>
		  <p></p>
		<p>
        <label for="selInstitucion">Institucion que impartira</label>
        <select name="selInstitucion" id="selInstitucion"  disabled="disabled" style="width:350px">
          <option selected value="">Seleccione</option>
          <?php
            //Seleccionar las instituciones formativas que estan inscritas
            $sql = "SELECT * FROM FORMATIVA,INSTITUCION WHERE FORMATIVA.INS_CODIGO=INSTITUCION.INS_CODIGO AND INSTITUCION.INS_ESTADO='A'";
			$result = mysql_query($sql);
				while ($row=mysql_fetch_array($result))
					{
						echo "<option value=".$row[INS_CODIGO].">".$row[INS_NOMBRE]."</option>";
					}
            echo "</select>";
            mysql_free_result($result);
			?>
        </select> 
		</p>
		<p></p>
		<p>
        <label for="txtLugar">Lugar donde se impartira</label>
        <textarea name="txtLugar" id="txtLugar" cols="25" rows="2" onkeypress="return permitir(event,'direccion')" class="bloquear doble-column" disabled="disabled"></textarea>
      </p>
	  <p></p>
      <p>
        <label for="FecInicio">Fecha inicio</label>
        <input type="text" name="FecInicio" id="FecInicio" disabled="disabled"/>
        <label for="FecFin">Fecha fin</label>
        <input type="text" name="FecFin" id="FecFin" disabled="disabled"/>
      </p>
	<p></p>	
      <p>
        <label for="numCupo">Cantidad cupo</label>
        <input type="text" name="numCupo" id="numCupo" disabled="disabled"/>
        <label for="numHoras">No. horas</label>
        <input type="text" name="numHoras" id="numHoras" disabled="disabled"/>
      </p>
	  <p></p>
      <p>
        <label for="txtHorCurso">Horario del curso</label>
        <input type="text" name="txtHorCurso" id="txtHorCurso" disabled="disabled" />
      <label for="txtTipofor">Tipo de formaci&oacute;n</label>
             <input type="text" name="txtTipofor" id="txtTipofor" disabled="disabled"/>
	  </p>
	  <p></p>
      <p>
        <label for="txtPerfil">Perfil de alumnos</label>
        <textarea type="text" name="txtPerfil" id="txtPerfil" cols="25" rows="3" class="bloquear doble-column" disabled="disabled" ></textarea>
      </p>
	  <p></p>
	  <p>
        <label for="txtExprevia">Experiencia previa</label>		
		<textarea name="txtExprevia" id="txtExprevia"  cols="25" rows="3" onkeypress="return permitir(event,'car')" class="bloquear doble-column" disabled="disabled"></textarea>
      </p>
      <p></p>
	  <p>
        <label for="txtValint">Valoraci&oacute;n integracion</label>		
        <textarea name="txtValint" id="txtValint" cols="25" rows="3" onkeypress="return permitir(event,'car')" class="bloquear doble-column" disabled="disabled"> </textarea>
      </p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
         </form>
  <!-- InstanceEndEditable --><!-- end .content -->  </div><!-- #BeginLibraryItem "/Library/footer.lbi" --><div class="footer">
    <p>Derechos Reservados copyright ©</p>
    <!-- end .footer --></div><!-- #EndLibraryItem --><!-- end .container --></div>
</body>
<!-- InstanceEnd --></html>
